package com.qdxwx.data.mapper.manager;

import com.qdxwx.common.page.PageRequest;
import com.qdxwx.models.manager.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 角色表 数据层
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
@Repository
public interface RoleMapper {

    List<Role> selectList(@Param("e") Role role, @Param("page") PageRequest page);

    int selectCount(@Param("e") Role role);

    List<Role> selectRolesByManagerId(int managerId);

    Role selectRoleById(Integer roleId);

    int deleteRoleByIds(Integer[] ids);

    int updateRole(Role role);

    int insertRole(Role role);

    int checkRoleName(String roleName);

    int checkRoleKey(String roleKey);
}
